package com.lingnan.blog.service;

import com.lingnan.blog.entity.View;
import com.lingnan.blog.mapper.ViewMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author HeGuanChao
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ViewService {
    @Autowired
    private ViewMapper viewMapper;

    public int insertSelective(View view) {
        return viewMapper.insertSelective(view);
    }

    public View findViewByIpAndAid(int id, String uid) {
        return viewMapper.selectViewByIpAndAid(id,uid);
    }
}
